package main

import "fmt"

func main() {

	a1 := []int{10, 21, 32}
	// 遍历查看值
	fmt.Printf("[len:%d cap:%d ]\n", len(a1), cap(a1))
	a1 = append(a1, 22)
	fmt.Printf("[len:%d cap:%d ]\n", len(a1), cap(a1))
	a2 := make([]int, 1000)
	a1 = append(a1, a2...)
	fmt.Printf("[len:%d cap:%d ]\n", len(a1), cap(a1))
	a3 := make([]int, 1000)
	a1 = append(a1, a3...)
	fmt.Printf("[len:%d cap:%d ]\n", len(a1), cap(a1))
	/*
		[len:3 cap:3 ]
		[len:4 cap:6 ]
		[len:1004 cap:1024 ]
		[len:2004 cap:2560 ]


	*/
}
